package com.nnnu.wsnackshop.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 会员信息表
 * </p>
 *
 * @author zk
 * @since 2025-05-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("members")
public class Members implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 会员ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 关联用户ID
     */
    @TableField("user_id")
    private Integer userId;

    /**
     * 昵称
     */
    private String nickname;

    /**
     * 性别（0:未知,1:男,2:女）
     */
    private Integer gender;

    /**
     * 头像URL
     */
    private String avatar;

    /**
     * 出生日期
     */
    private LocalDate birthday;

    /**
     * 会员等级ID
     */
    private Integer memberLevelId;

    /**
     * 积分
     */
    private Integer points;

    /**
     * 成长值
     */
    private Integer growthValue;

    /**
     * 会员开始时间
     */
    private LocalDateTime membershipStart;

    /**
     * 会员结束时间
     */
    private LocalDateTime membershipEnd;

    /**
     * 状态（0:禁用,1:启用）
     */
    private Integer status;

    /**
     * 微信OpenID
     */
    private String openid;

    /** 创建时间 */
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    /** 更新时间 */
    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;
}
